#include "../include/Game.h"
#include <cstdlib>
#include <string>

int main(int argc, char* agrv[])
{
    
    std::string strType; // 0为同台电脑，1表示联机
   
    while(true)
    {
        std::cout << "*****************************" << std::endl;
        std::cout << "*******Welcome to Game*******" << std::endl;
        std::cout << "**1、单机版*******************" << std::endl;
        std::cout << "**2、联机版*******************" << std::endl;
        std::cout << "**3、退出*******************" << std::endl;
        std::cout << "*****************************" << std::endl;
        std::cout << "请输入你的选择:"; 
        getline(std::cin, strType);
        Game game;
        switch(atoi(strType.c_str()))
        {
            case 1: 
            {
                game.init(0);
                game.play();
                break;
            }
            case 2:
            {
                game.init(1);
                game.netPlay();
                break;
            }
            case 3:
            {
                return 0;
            }
            default:
                break;
        }
        system("clear");
    }
    return 0;
}